
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';

class FirstApp extends StatelessWidget{

  String defauleUrl ="https://img0.baidu.com/it/u=3365573645,2073973856&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500";

  @override
  Widget build(BuildContext context) {

    return MaterialApp(title: "weng的第一个flutter页面",
      home: Scaffold(
        appBar: AppBar(title:const Text("Welcome to my First app Page")),
        body:  Center(child:FadeInImage(placeholder:const AssetImage("assets/images/icon_placeholder.gif"),
            image: NetworkImage("http://life-moments-private-dev.shall-buy.top/2022/7/10/29dc6807-12d1-4879-b24c-9f14ca8f3a08?imageView2/2/w/1080/interlace/1/q/50/ignore-error/1&e=1657619423&token=NS28RPZpMqUmuhtIE2xDcWtQnRqyL10mTq6aCESm:J0_uMET1kSLYL0r2ofCoQrOqAsg="),
            imageErrorBuilder : (context, error, stackTrace) {
              return Container(
                child: Image.asset("assets/images/icon_error.png",fit: BoxFit.fill,),
                height: 150,
                color: Colors.grey,
              );
            }
        ),)),
    );
  }


}